<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ include file="/commons/pages/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div class="subtitle">
  <h3>编辑信息</h3>
</div>
<s:form action="LoginUserInfo!save.action" method="post" name="form">
  <s:token />
  <input type="hidden" name="model.id" value="<s:property value='model.id'/>"/>
  <input type="hidden" name="model.pass_word" value="<s:property value='model.pass_word'/>"/>
  <table width="100%" border="0" cellpadding="5" cellspacing="1" class="tbl_list">
    <tr>
      <th width="12%" align="right"><font color="red">*</font>用户名：</th>
      <td width="88%"><input name="model.user_name" type="text" class="webinput" size="25" value="<s:property value='model.user_name'/>" dataType="Require" msg="请填写用户名" /></td>
    </tr>
    <tr>
      <th width="12%" align="right">真实姓名：</th>
      <td width="88%"><input name="model.real_name" type="text" class="webinput" size="25" value="<s:property value='model.real_name'/>"/></td>
    </tr>
    <tr>
      <th width="12%" align="right">联系电话：</th>
      <td width="88%"><input name="model.tel" type="text" class="webinput" size="25" value="<s:property value='model.tel'/>"/></td>
    </tr>
    <tr>
      <th width="12%" align="right">所属项目：</th>
      <td width="88%"><select id="sel_project" name="model.proj_id" onchange="initShareList(this.value,'sel_shareArea')"></select></td>
    </tr>
    <tr>
      <th width="12%" align="right">所属户主：</th>
      <td width="88%">
      	<select id="sel_shareArea" name="model.share_area_id" onchange="initBuildingList(this.value,'sel_building')"></select>
      	<select id="sel_building" name="model.build_id" onchange="initRoomList(this.value,'sel_room')"></select>
      	<select id="sel_room" name="model.room_id"></select>
	  </td>
    </tr>
    <tr>
      <th width="12%" align="right"><font color="red">*</font>用户角色：</th>
      <td width="88%">
      	<select name="model.user_role" dataType="Require" msg="请填写选择用户角色">
      		<option value="">请选择</option>
      		<option value="1" <s:if test="model.user_role==1">selected="selected"</s:if>>超级管理员</option>
      		<option value="2" <s:if test="model.user_role==2">selected="selected"</s:if>>施工管理员</option>
      		<option value="3" <s:if test="model.user_role==3">selected="selected"</s:if>>分摊管理员</option>
      		<option value="4" <s:if test="model.user_role==4">selected="selected"</s:if>>施工账号</option>
      		<option value="5" <s:if test="model.user_role==5">selected="selected"</s:if>>销售</option>
      		<option value="6" <s:if test="model.user_role==6">selected="selected"</s:if>>技术</option>
      		<option value="7" <s:if test="model.user_role==7">selected="selected"</s:if>>普通用户</option>
		</select>      
      </td>
    </tr>
    <tr>
      <th>&nbsp;</th>
      <td><input type="submit" class="websub" value="提 交" />
        <input type="button" class="websub" onclick="history.back();" value="返 回" /></td>
    </tr>
  </table>
</s:form>
<script src='/dwr/interface/BaseDataService.js'></script>
<script src='/dwr/engine.js'></script>
<script src='/dwr/util.js'></script>
<script src='/commons/scripts/validator.js'></script>
<script type="text/javascript">
$j(document).ready(function(){
	initProjAreaBuildingRoom('sel_project','<s:property value='model.proj_id'/>','sel_shareArea','<s:property value='model.share_area_id'/>','sel_building','<s:property value='model.build_id'/>','sel_room','<s:property value='model.room_id'/>');
	
	form.onsubmit = function () {
		return Validator.Validate(this, 3)
	}
	
});
</script>
</body>
</html>
